plat/arm/sgi: add platform support for SGI-Clark.Helios platform
authorChandni Cherukuri <[email protected]>
Tue, 16 Oct 2018 08:45:31 +0000 (14:15 +0530)
committerChandni Cherukuri <[email protected]>
Thu, 6 Dec 2018 10:21:54 +0000 (15:51 +0530)
SGI-Clark.Helios platform is based on multi-threaded CPUs and uses an
additional thread power domain level as well.

Define a power domain tree descriptor 'sgi_clark_helios_pd_tree_desc'
for SGI-Clark.Helios platform and let the function
'plat_get_power_domain_tree_desc' pick up the correct power
domain tree descriptor based on the platform.

Change-Id: Ibc6d551b570bc740053316a3608c455679d9155b
Signed-off-by: Chandni Cherukuri <[email protected]>
plat/arm/css/sgi/include/sgi_variant.h
plat/arm/css/sgi/sgi_topology.c

index 56dc33449d130762707592d7bf3d2527eb05c6a9..e9b96dd461b72d64234e3f39913e1694bdd57393 100644 (file)
@@ -12,6 +12,7 @@
 
 /* SID Version values for SGI-Clark */
 #define SGI_CLARK_SID_VER_PART_NUM             0x0786
+#define SGI_CLARK_HELIOS_CONFIG_ID             0x2
 
 /* Structure containing SGI platform variant information */
 typedef struct sgi_platform_info {
index e524f11f7dc01f64143b03756b98f06b8e9c088c..2921c0c276e5f441855c655ea1e6f5a76c7d7243 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <plat_arm.h>
+#include <sgi_variant.h>
 
 /* Topology */
 /*
@@ -19,12 +20,39 @@ const unsigned char sgi_pd_tree_desc[] = {
        CSS_SGI_MAX_CPUS_PER_CLUSTER
 };
 
+/* SGI-Clark.Helios platform consists of 16 physical CPUS and 32 threads */
+const unsigned char sgi_clark_helios_pd_tree_desc[] = {
+       PLAT_ARM_CLUSTER_COUNT,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_CPUS_PER_CLUSTER,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU,
+       CSS_SGI_MAX_PE_PER_CPU
+};
+
 /*******************************************************************************
  * This function returns the topology tree information.
  ******************************************************************************/
 const unsigned char *plat_get_power_domain_tree_desc(void)
 {
-       return sgi_pd_tree_desc;
+       if (sgi_plat_info.platform_id == SGI_CLARK_SID_VER_PART_NUM &&
+           sgi_plat_info.config_id == SGI_CLARK_HELIOS_CONFIG_ID)
+               return sgi_clark_helios_pd_tree_desc;
+       else
+               return sgi_pd_tree_desc;
 }
 
 /*******************************************************************************